clear all
set more off
set matsize 10000
set maxvar 100000
set emptycells drop
tempfile ubigeo temp


local lista trust_police trust_army trust_church trust_newsp trust_rtv trust_parties trust_regi trust_jury trust_parliament trust_jne trust_onpe
local controls schooling male rural native married head 

use mergedp, clear

egen voted_bn = rowmax(voted_blank voted_null)
recode voted_bn voted_blank voted_null (. = 0) if voted == 0

** LABELS
label var todoA "Army"
label var todoT "Terrorist"

egen grupo = group(ubigeo1993 ubigeonac1993)

******* Results
drop if vote_matter == .
local lista vote_matter voted voted_blank voted_null voted_bn partN dem_works dem_matters1 gov_demo1 gov_auto1

rwolf vote_matter voted voted_blank voted_null voted_bn partN dem_works dem_matters1 gov_demo1 gov_auto1, indepvar(todoA todoT) controls(`controls' i.ubigeonac1993 i.ubigeo1993 i.age i.year i.provid#c.trend) reps(250)

************************* NOTE
*                  Results from this output were inputed manually in .tex file
*                  This dofile reports the numbers in the paper 
